home *** CD-ROM | disk | FTP | other *** search
- VPIC.EXE ver 1.6 by Bob Montgomery [CIS 73357,3140] 5-4-89
- See revision history for new items. Next generation of VGIF; will now support
- various paint formats in addition to GIF. Configuration program supplied to
- configure VPIC to your extended VGA board. See revision history for latest
- additions and bug fixes.
-
- IMPORTANT: Requires DOS 2.0 or up to run from current directory, or DOS 3.0 up
- to run from anywhere.
-
- This is a file viewer for VGA/EGA with the following features:
- * Menu text color now setable in configuration file.
- * Escape aborts decodes.
- * Help while viewing with / or ? key.
- * Shows filename while decoding.
- * Allows deleteing a file (with query) while viewing with X key.
- * Saves/views new 256 color PCX's per PC Paintbrush ver 1.61.
- * Now does MAC, PCX, and ColorRix viewing, in addition to GIF.
- * Added configuration option for all VGA boards using Tseng, Paradise,
- Everex, or Video 7 chip sets; see configuring VPIC below.
- * Added EGA/VGA mode toggle from menu.
- * Added default resolution set, and mode lock key from menu.
- * Now allows adjustment of picture color and VGA contrast and brightness.
- * Saves to GIF, PC Paint/Pictor, ZSoft, ColoRix, Targa, Dr. Halo CUT and
- Deluxe PaintII formats in VGA or EGA.
- * Now handles up to 500 files.
- * Very fast GIF decoding.
- * Menu driven for selecting file(s) to view; returns with cursor at last
- position.
- * Shows specified files like a slide show.
- * /R option allows an application program to show a file and regain control.
- =============================================================================
- Format:
- vpic [path\filespec][/e][/r][/c][/w][/?].
- The default path is the current dir, and the default extension is GIF.
- The /e option forces EGA mode, to use extended 16 color modes.
- The /r option returns control to a calling program; see 5 below.
- The /c option gives the current configuration.
- The /w option wait for a keypress after each image in a multi_image file.
- The /? option gives a help screen.
- If filespec is a filename, the single file will be shown.
- If path\filespec is a directory, a menu of all GIF files will appear.
- Options may be entered in any order, except as detailed in 7 below.
-
- The options details are:
- 1. vpic [path\]filename[.ext] shows the file specified. The default path is the
- current directory, and the default extension is GIF.
-
- 2. vpic [path\][filespec] to get a menu of all files in the specified path
- meeting filespec (may contain wildcards). The default path is the current
- directory, and the default filespec is *.GIF; just entering 'vpic' will
- give a menu of all GIF files in the current directory. Shows whether VGA or
- EGA and modes supported in upper left corner. Path may not be . or .. since
- these would be interperted as an extension spec.
-
- 3. vpic /@[path\]slidefile[.ext] to do a slide show from commands in the
- slidefile file. The default path is the current directory, and the default
- extension is SLD. The commands are placed on seperate lines, and consist of
- either a filename (GIF extension assumed) and optional display mode, or a
- delay (viewing time) spec of the form d n where n is the desired viewing
- time in seconds. The default viewing time is 5 seconds if no delay spec is
- given, and the default viewing mode is whatever would look best. VPIC
- understands comments preceeded by a semicolon, blank or comment lines, and
- extra spaces. For example, the following is file contents are understood by
- VPIC:
-
- file1 1 ;First file in slideshow. Use mode 1.
- file2.pcx ;This is a ZSoft filename with leading spaces
- ;This is a comment line with leading spaces, next is a blank line.
-
- file3
- d 15 ;Use 15 second delay. Has leading and seperator spaces.
- To end a slide show after the current picture, press any key. Escape ends
- it immediately.
-
- The mode requires a little further explaination. In the above slide file,
- it says to use mode 1 with file1. Modes 1 thru 10 are the VGA (256 color)
- modes, and modes 11 thru 20 are EGA (16 color) modes called out in the
- configuration file. Most display boards only have a few of each type. The
- Orchid Designer has 4 VGA modes and 4 EGA modes in the configuration file.
- The VGA modes are 1. 320x200, 2. 640x350, 3. 640x480, 4. 800x600, and the
- EGA modes are 11. 640x350, 12. 640x480, 13. 800x600, 14. 1024x768. Then,
- the slide file says to show file1 in the 320x200x256 mode, and show all the
- others in the default modes.
-
- 4. vpic /r shows the file and then returns to DOS (or a calling application
- program) with the picture still on the screen in EGA/VGA. It is not
- necessary to change video mode between viewing each file, but it is up to
- the calling program to reset text mode (mode 3) after all viewing is done.
-
- 5. vpic /e forces and EGA display with VGA to use extended EGA modes.
-
- 6. vpic /c prints the current configuration of vpic. You can configure vpic to
- your display board using the VCONFIG program and a text configuration file
- describing your board.
-
- 7. vpic /? gives a help screen.
- ==============================================================================
- CONFIGURING VPIC
- To configure VPIC, enter
- CVPIC [config_file]
- where the default configuration file is VPIC.CFG, which is for the Orchid
- Designer VGA board with white menu text color. Generally, you will answer
- n to the 1st question and y to the 2nd question.
-
- The default configuration of VPIC is for the Orchid Designer VGA card with
- 512K of display memory. If you have just EGA, you should use the EGA.CFG
- file. If you have plain vanilla VGA (modes 10h, 12h, and 13h), use VGA.CFG.
- The meaning of each field is given in display.brd, and the appropriate
- portion of this file can be copied to a configuration file for most boards
- using the Tseng, Paradise, Everex, ATI, or Video 7 VGA chip sets. Sample
- configuration files are enclosed in this arc file for some of the more
- popular boards, and can be modified for your board.
-
- CONFIGURATION FILE - Characters after a ; are considered comments and ignored.
- The first line is the board name, and will appear in the VPIC menu.
- The 2nd line is the chip set, and should be TSENG, PARADISE, EVEREX, ATI,
- VIDEO7, or GENERIC presently.
- The 3rd line is the number of 64K banks of display ram usable for 256 color
- VGA pics (1 for standard VGA).
- The 4th line is the menu text color; 0 thru 15 corressponds to black, blue,
- green, aqua, red, violet, brown, white + 8 bright versions. For example
- 12 would be bright red text.
- The following lines describe the modes supported by the board. Each field
- is of the form F1 F2 AX BX CX DX W H C where:
- F1 = VGA (256 color) mode
- F2 = 16/256 colors (as in mode 12h).
- AX,BX,CX,DX register values used to set this mode.
- W, H, C are width, height, colors in this mode.
- All the VGA (256 color) modes should be grouped first, followed by the EGA
- (16 color) modes.
-
- =============================================================================
- Commands in menu mode:
- 1. The up, down, right, and left arrow keys move the cursor around the menu of
- files.
- PgDn/PgUp goto next/previous page.
- Pressing a key goes to next file starting with this character.
- 2. Pressing the spacebar marks a file for viewing or slides, and moves to the
- next file; it will also unmark a previously marked file.
- 3. Pressing enter will display the marked files in the order they were marked.
- If no files were marked, pressing enter displays the file at the cursor.
- 4. Pressing F1 will bring up the help screen; any key will return to the menu.
- 5. Pressing F2 will do a slide show of marked files until a key is pressed.
- 6. Pressing F3 will display the file size and colors on the next to last line.
- 7. Pressing F4 will toggle between VGA and EGA modes.
- 8. Pressing F5/F6 will decrease/increase the default resolution for files
- larger than 320x200 in VGA.
- 9. Pressing F7 toggles the LOCK, which forces the default resolution (above)
- no matter what the file size.
- 10. Pressing ESCape ends the program and returns to DOS.
- 11. Pressing Ctrl Break (or Ctrl C) will get you directly to DOS.
- All other keys are ignored. If errors are encountered, an error message appears
- on the next to last line, and disappears when the cursor is moved. The menu
- title is the search spec.
-
- DECODING OTHER FILE FORMATS
- The other file decoding (MAC, PCX, and ColoRix now) works in whatever mode you
- are presently using (VGA or EGA) and at the resolution you are viewing with.
- This way, if you choose to save to another file format, it will be in the same
- mode you are viewing with (VGA or EGA). The decoding is not as fast as could be
- done, but the added versatility more than compensates for this. For example, EGA
- PCX files can be very quickly decoded to EGA, but are in the wrong format for
- VGA, and considerable manipulation is required to produce a VGA image. For all
- formats except GIF, the method of viewing is to decode to a buffer for a single
- line at 1 byte/pixel, then copy this line to the display in whatever mode you
- are in. This is a compromise for most file formats, since they are geared to EGA
- or VGA, and display time suffers for the other mode, but it makes the code much
- simpler. Besides, the other formats are supported mainly to allow easy
- conversion to GIF, which is the preferred format for storage, since it gives the
- smallest file size. This will also make EGA <-> VGA conversions possible, which
- is not supported by most paint programs.
-
- ADDED FEATURES
- VPIC is meant to fill a void not covered by paint programs, and to allow
- very convenient file viewing and conversion between file formats. It is not
- meant to compete with the paint programs, and in general if a paint program does
- something well (such as resize a picture to fill the screen or cut out a portion
- of the picture), VPIC will not attempt to do it. On the other hand, if you think
- of a feature which would enhance VPIC, please let me know, and I will consider
- adding it to the program.
- ==============================================================================
- Commands while viewing a file (except in slide mode):
- 1. The up/down arrow keys will scroll the picture if longer than the screen.
- The PgUp and PgDn keys will scroll by 10 lines. The Video 7 extended VGA
- boards do not supported writing to non-displayed memory or scrolling pics
- larger than the screen, so this function is disabled for these boards.
- 2. If pic is <= 1/2 the screen width, pressing 2 will give a double size image
- (which may be scrollable) and pressing 1 will give the normal size again.
- For VGA, the picture will be changed only in the horizontal direction; this
- will unsquash some 320x400 pics so the aspect ratio is correct.
- 3. Pressing + will increase the resolution (320x200 to 640x480, etc).
- 4. Pressing - will decrease the resolution; useful if 800x600 rolls.
-
- All the following conversion options check if the default filename is present,
- and promt for a new name if it is. They all now let you know what is happening
- while the conversion prodceeds. If you screw up at the new filename prompt, hit
- Ctrl C to escape immediately to DOS; this will usually preserve a file you don't
- want to write over. The safest bet is to view files on floppy, while running
- VPIC from the hard disk. The new file is saved to the default drive, which is
- the directory you run VPIC from.
- 5. Pressing Z will create a ZSoft (PC Paintbrush) file with the same filename
- and extension PCX. The file will be in whatever mode you are currently
- using (EGA or VGA). The VGA palette will probably be wrong since ZSoft does
- not currently have a means of saving a palette with a VGA picture, so the
- default VGA palette is used, and probably won't match the palette for the
- picture being displayed. This is not too good for 'the default standard
- Paint program'.
- 6. Pressing P will create a PC Paint or Pictor file with the same size as the
- current screen. The default extension is .PIC, and for EGA it prompts for a
- PC Paint or Pictor file.
- 7. Pressing G or I will create a GIF file on the default drive, and promt for
- a new filename-the default extension is GIF; G is for non-interlaced, and I
- is for interlaced files. The GIF file will be the same size as the current
- image.
- 8. Pressing R will create a ColoRix file with the same filename and extension
- SCx where x is a function of the screen size. If in EGA, will prompt if you
- want an EGA Paint or ColoRix file.
- 9. Pressing T will create a Targa 16 file with the same filename and extension
- TGA.
- 10. Pressing C will create a Dr. Halo CUT file with the same filename and
- extension CUT. The pic will be the same size as the GIF file is currently
- on the screen. A palette file will also be created.
- 11. Pressing A will 'animate' a picture by rotating the palette periodically.
- This is especially effective on fractals, where large areas tend to be the
- same color. Pressing spacebar will pause the palette rotation, and pressing
- Enter will terminate it and return to the command mode. Thus, by waiting
- for an especially nice pattern and then pressing Enter, the pattern can be
- written to a file using the above file save commands. Pressing Esc will
- return to the menu.
- 12. Pressing X will prompt you to delete the current file. If you answer y
- (yes), it will be deleted.
- 13. Pressing enter will return to menu or DOS, or show next file for marked
- menu mode.
- 14. Pressing ESCape will end the display and return to the menu.
- 15. The following keys control the picture tone as follows:
- F1 Decrease red content of picture.
- F2 Increase red content of picture.
- F3 Decrease green content of picture.
- F4 Increase green content of picture.
- F5 Decrease blue content of picture.
- F6 Increase blue content of picture.
- F7 Decrease contrast of picture (VGA only).
- F8 Increase contrast of picture (VGA only).
- F9 Decrease brightness of picture (VGA only).
- F10 Increase brightness of picture (VGA only).
- Alt-F10 Restore original palette after you thoroughly mess up the colors.
- V Reverses the current palette (EGA only); interesting effect especially
- for black & white images.
- After a little experimenting, a 'washed out' VGA picture can be greatly
- improved by using F1-F10 , and you can always start over by using Alt-F10.
- To retain a black background in a VGA picture, the brightness should be
- decreased when the contrast is decresed. If you have really improved the
- picture, you can then save it to GIF by pressing G of I. VPIC will prompt
- you if the file exists in the default directory, and you have the option of
- overwriting it or giving a new filename. This works really well with images
- created on the Howtec or Targa scanners.
- All other keys are ignored. Pressing Ctrl Break (or Ctrl C) will go to DOS.
- ===============================================================================
- IMPORTANT: Support for boards with other chip sets: VPIC will support other VGA
- boards with extended VGA modes if the owners will write me with the details
- of how to set the various modes, and how to bank switch the display memory.
- Of course, if you also register VPIC I will give the problem more
- consideration.
- The bank switching Info for some of the 'not so common' VGA boards is
- hard to come by, and is needed if VPIC is to support extended VGA modes for
- these boards. A VGA board needs to bank switch for extended modes because
- there is only a 64K window in the PC address space for graphics memory (from
- A000 to AFFF), and extended modes require more than 64K of memory;
- 640x480x256 requires 307200 bytes of memory, or about 4.7 'banks of 64K'.
- Bank switching is a means of mapping the (A000 to AFFF) graphics address
- space into 64K chunks of actual display memory. Bank switching is a function
- of the chip set used on the display board, and what I need is info on how to
- switch banks and how to set the various modes the board supports. The use of
- a display board would also help, since it will allow me to test the program
- with that display board instead of 'programming blind'.
- ----------------------------------------------------------------------------
- SHAREWARE
-
- VPIC is user supported software. VPIC for the IBM PC is made available for a
- free ten day trial period. If you find this program useful, you may license
- the program for non-commercial use on one machine by sending $15.00 to:
-
- Bob Montgomery
- 132 Parsons Road
- Longwood, Fl 32779
-
- If you are already registered for VGIF (any version) you may upgrade to VPIC for
- an additional $5.
-
- VPIC may be licensed for commercial use on up to 10 computers at a single site
- or set of contiguous sites for $75.00. A commercial site is defined as a
- business or individual seeking to make a profit by selling VPIC or incorporating
- this program in another program.
-
- Clubs, schools, universities and other organizations may license VPIC for
- $45.00 per 6 copies.
-
- If you use VPIC as part of a commercial demo or as a utility for another
- application you must obtain a license from Bob Montgomery, and pay a $1/copy
- royalty for each copy shipped.
-
- All other rights are reserved.
-
- VPIC may not be changed or modified in any way except by the author. VPIC may
- be freely distributed for the ten day trial period as long as it remains in its
- complete form. Regardless of how the copy is obtained, it is requested that
- all users comply with the licensing agreement.
-
- All warranties are disclaimed, including damage to hardware and/or
- software from use of this product. In no event will I be liable to you for
- any damages, including lost profits, lost savings or other incidental or
- consequential damages arising out of your use or inability to use the
- program, or any other claim by any other party.
-
- Contact Bob Montgomery for:
- 1. Special versions of VPIC tailored to your application.
- 2. Other graphics oriented applications (file conversion, etc).
-
- Any suggestions or comments can be mailed directly to me, or left on the
- following graphics oriented BBS's:
-
- Compuserve PICS Forum (My ID is 73357,3140)
- Tsunami BBS, Half Moon Bay, Calif. (415) 726-2726
- PC Rockland, S. Nyack, NY (914) 353-2538 [Freeboard] 1.6 Gbyte Online
- Megabyte Image Center (918) 492-0087 1200/2400/9600 baud USR HST
- Integrated Micro Systems (918) 747-3560 1200/2400/9600 baud USR HST
- Picture Gallery (319) 296-1393 1200/2400/9600 baud USR HST
- Russ & Edies (216) 726-0737 1200/2400/9600 baud USR HST
- NixPix (303) 920-1263 1200/2400/9600 baud USR HST
- -------------------------------------------------------------------------
- Revision history:
- ver 1.1 1-13-88
- Added test for EGA adapter.
- Fixed menu colors.
- Allow ESCape from marked file viewing.
- Added Ctrl Break (or Ctrl C) exit to DOS anywhere.
- Added 'disk full' notification when creating picture file.
- Added critical error handler for 'drive not ready' errors.
- ver 1.2 1-15-88
- Changed name to vgif.
- Slide mode now ignore the end of file mark in slide file, and any key
- will now end slide mode.
- Added slides to menu mode if S pressed-shows marked files as slides
- until a key is pressed.
- ver 1.3 1-21-88
- Added better error checking to GIF file decoding. Notifies if bad GIF
- file.
- Fixed error reporting bug in single file mode.
- ver 1.4 2-9-88
- Added instantaneous screen update in slide mode from menu or command
- (sld) file.
- Added the /r option which allows an application program to call vgif
- to view a file and then regain control.
- ver 1.5 3-2-88
- Added Page Up and Page Down keys to scroll by 10 lines at a time.
- Added a max pic height of 819 lines so EGA buffer would not overflow.
- Greatly improved color reproduction for 'problem' pictures (such as
- FROG, ARCHIT, PUFFIN, VEGTABLE, etc). These pictures typically
- have more than 16 colors. Selected colors on basis of frequency
- of use where possible.
- Fixed following bugs:
- 1. Line buffer would overflow into other variables if pic width
- was > 640 pixels, causing strange results.
- 2. Didn't recognize the end of image marker correctly. This would
- cause the palette to change when the image was done.
- ver 1.6 3-11-88
- Fixed a bug in handling multiple images. First noticed when viewing
- WHIMMI.GIF.
- Use same palette for multiple images, and get best color match.
- Added L and S commands while viewing a picture. These allow you to
- create full size paint program files.
-
- ver 2.0 3-26-88
- Added the ability to view long GIF files ( > 819 lines) without
- wrapping the display.
- Added the C and H (Dr. Halo) file creation option while viewing.
- Added the L and S prefixes to paint program file creation commands
- while viewing to save long pic files.
- Added the Info and Help commands in menu mode.
- Deleted the # requirement to specify a directory from the command
- line. The program now looks for a directory which meets the
- spec on the command line. If none is found, it assumes the spec
- is for a single file.
- Added F1 - F10, and V palette control keys while viewing a file.
-
- ver 3.0 5-2-88
- Added VGA capability, and support for Tseng extended VGA modes
- (640x480x256 and 800x600x256).
- Determines and displays available modes for your system.
-
- ver 3.1 5-11-88
- Fixed a bug in dir/file spec from command line. Now accepts
- vgif d:\dir\*.gif or vgif d:*.gif, although the [\]*.gif is not
- required, since this is the default filespec.
- Fixed a bug in forced EGA when doing slides, where an interlaced pic
- displayed at double size would have a 'venetian blind' effect.
- Changed so pics larger than 320x200 are shown in 640x480 VGA; can get
- 800x600 by pressing + key.
- Note that EGA mode on the Orchid VGA card appears squashed
- vertically. This is normal, and cannot be corrected without
- reprograming the parameters for mode 16, which would change
- the vertical retrace frequeny, and probably cause your monitor
- to roll.
-
- ver 3.2 5-26-88
- Added 500 file menu, and assy language text screen updating; now
- super fast.
- Fixed a bug which caused the Vega VGA card to hang up.
-
- ver 3.3 6-9-88
- Added user spec of video mode for non-Orchid VGA boards.
- Added GIF and Pictor save of current screen for VGA/EGA pics.
- Added prompts to screen for conversion to other formats.
- Removed conversion starting at first visible row-now does whole pic.
-
- ver 3.4 6-23-88
- Fixed a bug in the GIF save routine.
- Added color, contrast, and brightness adjustment in VGA.
- Fixed a bug in menu mode for marked files.
- Added /n command line option to stay in 640x480x256 for VGA pics.
-
- ver 3.5 7-14-88
- Fixed some misc minor bugs.
- Added inrease/decrease resolution command while viewing 16 color VGA
- pics (using the /e option).
- Added slide mode for VGA.
- Added lock mode option to start pics from the menu in a desired mode.
-
- ver 3.6 8-8-88
- Fixed some bugs.
- Fixed EGA slide show.
-
- ver 3.6A 9-10-88
- Fixed 1024x768x16 mode.
-
- VPIC ver 1.0 & 1.1 12-27-88
- Beta test versions.
-
- VPIC ver 1.2 12-27-88
- Added configuration option for various display boards.
- Added VGA file conversion for all previous Paint programs supported.
- Added Deluxe Paint 2 conversion.
- Added Targa 16 file conversion.
- Added EGA/VGA toggle from menu.
- Added default resolution select, and Mode Lock key from menu.
- Added WAIT option to pause between images of multi-image files.
- Added MAC, PCX, & Colorix file viewing capability. Others will be
- added in later versions.
- Added 'animate' while viewing.
- Fixed VGA 16 color palette.
-
- VPIC ver 1.2A 1-4-89
- Fixed MAC -> GIF conversion
- Fixed CVPIC for ^Z as EOF char.
- Fixed 16 color palette for other file formats if VGA 16 colors.
-
- VPIC ver 1.3 2-2-89
- Fixed cursor in menu.
- Fixed 'lock up' if GIF header size wrong (640x350 labeled 350x640).
- Now pauses pic if file error amd waits for key press-can see partial
- pics in bad files this way.
- Shows GIFs with MAC headers (1st 128 bytes are not GIF standard);
- if F3 (info) pressed shows if file has a MAC header.
- Fixed so views and saves new ZSoft VGA PCX files which include
- palette at end of file. Still doesn't load PAL files.
- Fixed ZSoft file displays and saves.
- Added Wait toggle (F8) which pauses between images in multi-image
- GIFs, and allows conversion to other filetypes.
- Made MACs black on bright white instead of grey.
- VPIC ver 1.4 3-15-89
- Added printout of filename while decoding except in slide mode.
- Added help while viewing a picture; press ? or /.
- Added delete a file option X (with query) while viewing.
- Added hit Escape while decoding to abort picture.
- VPIC ver 1.5 3-23-89
- Fixed bug in 'Escape while decoding' which would hang system.
- Fixed EGA x2 display for interlaced files.
- Fixed problem with saving a pic after scrolling.
- Fixed palette in animate, so save will use current palette.
- Fixed problem with bad files in slide mode that would hang computer.
- Fixed error display in /@ slide mode and single file mode.
- VPIC ver 1.6 4-5-89
- Fixed bugs in slide show from command file. Added comments.
- Added resolution option for each picture in slide command file.
- Fixed miscellaneous minor bugs.
-